package com.example.win.android_banduyujia.peopleactivity.activity.activity.openactivity.courseactivity.adapter;


import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.example.win.android_banduyujia.R;
import com.example.win.android_banduyujia.entity.CurrEntity;
import com.example.win.android_banduyujia.entity.VenuesCourseEntity;
import com.example.win.android_banduyujia.venuesactivity.activity.openactivity.VenuesCourseActivity;

import java.util.List;

/**
 * Created by Win on 2015/9/6.
 */
public class CourseAdapter extends RecyclerView.Adapter{

    private String[]  dabaset;

    public CourseAdapter(String[] dabaset) {
        this.dabaset = dabaset;
    }

    private Context   mContext;
    private VenuesCourseEntity   mCourseList;
    private List<CurrEntity>     mDataList;

    public CourseAdapter(Runnable context, List<CurrEntity> CourseList) {

    }

    public CourseAdapter(Context  context, List<CurrEntity> mDataList) {
        this.mContext = context;
        this.mDataList = mDataList;
    }

    public CourseAdapter(VenuesCourseActivity venuesCourseActivity, VenuesCourseEntity mVenuesCourse) {

    }

    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
        View  view=View.inflate(viewGroup.getContext(),R.layout.view_today_list_item, null);

        return new OrderListViewHolder(view);
    }

    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int i) {

    }

    @Override
    public int getItemCount() {
        if(mDataList !=null){
            return mDataList.size();
        }
        return 0;
    }

    public void setListDatas(List<CurrEntity> listDatas) {
        this.mDataList = listDatas;
        super.notifyDataSetChanged();
    }

    private class OrderListViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {

        private Context  mContext;
        private LinearLayout linearLayout;

        public OrderListViewHolder(View itemView) {
            super(itemView);

            linearLayout=( LinearLayout)itemView.findViewById(R.id.layout_linear_today_page);
            linearLayout.setOnClickListener(this);
        }

        @Override
        public void onClick(View v) {

        }
    }
}
